package cn.zjutleo.village_server.dto;

import cn.zjutleo.village_server.constants.RegexConstants;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;

/**
 * @author : Qin Zhenghan
 * @date : Created in 2021/8/24
 * @description: 手机绑定DTO
 */
@Data
public class PhoneBindDto {
    /**
     * 手机号
     */
    @ApiModelProperty("用户手机号")
    @Pattern(regexp = RegexConstants.MOBILE, message = "手机号格式错误！")
    @NotEmpty(message = "手机号不能为空！")
    private String phone;
    /**
     * 验证码
     */
    @ApiModelProperty("短信验证码")
    @NotEmpty(message = "短信验证码不能为空！")
    private String code;
}
